/*************************************************** * This is a routine to test the basic functions * of the board used in 330/340 in 05-06. * It does the following: * COunts up and down on the LED's twice * Writes a message to the LCD * runs an 57600 a terminal program which * echoes character to the screen and to the LCD * * ************************************************/ #include #include "EESD.h" #pragma DATA _CONFIG1H, _OSC_HS_1H //10 mhz #pragma DATA _CONFIG2H, _WDT_OFF_2H #pragma DATA _CONFIG4L, _LVP_OFF_4L & _XINST_OFF_4L #pragma DATA _CONFIG3H, _MCLRE_ON_3H #pragma CLOCK_FREQ 10000000 void main(void) { char j; char a; LCD_init(); LCD_printf("Test Program"); delay_s(2); trisd = 0 ; // port d output for(j = 0; j < 255; ++j) { latd = ~j; delay_ms(10); } for(j = 0; j < 255; ++j) { latd = j; delay_ms(10); } LCD_clear(); LCD_printf("test"); LCD_setpos(1,0); LCD_printf("Line 2 of display"); delay_s(2); LCD_clear(); LCD_printf("Welcome to EE Senior Design..."); LCD_setpos(1,0); LCD_printf(" Are we having fun yet????"); while(1) { delay_ms(200); LCD_cmd(0x18); // shift display left } }